package com.wiserp.rest.resource;

import org.restlet.resource.Get;
import org.restlet.resource.ResourceException;
import org.restlet.resource.ServerResource;

import com.wiserp.rest.helper.CheckTransferHelper;
import com.wiserp.rest.helper.DlvOrderHelper;
import com.wiserp.rest.helper.PickSlipHelper;
import com.wiserp.rest.helper.SuppInvBackHelper;
import com.wiserp.rest.helper.SuppInvHelper;
import com.wiserp.rest.helper.TransferHelper;
import com.wiserp.rest.helper.WoInvHelper;
import com.wiserp.rest.model.Kanban;

public class KanbanResource extends ServerResource{
	private DlvOrderHelper dlvOrderHelper;
	private PickSlipHelper pickSlipHelper;
	private SuppInvHelper suppInvHelper;
	private SuppInvBackHelper suppInvBackHelper;
	private WoInvHelper woInvHelper;
	private TransferHelper transferHelper;
	private CheckTransferHelper checkTransferHelper;
    protected void doInit() throws ResourceException {
	}
    
    @Get
    public Kanban getKanban(){
    	Kanban data = new Kanban();
    	data.setDlvOrderCount(dlvOrderHelper.getUnpostCount());
    	data.setPickSlipCount(pickSlipHelper.getUnpostCount());
    	data.setSuppInvCount(suppInvHelper.getUnpostCount());
    	data.setWoInvCount(woInvHelper.getUnpostCount());
    	data.setSuppInvBackCount(suppInvBackHelper.getUnpostCount());
    	data.setTransferCount(transferHelper.getUnpostCount());
    	data.setCheckTransferCount(checkTransferHelper.getUnpostCount());
    	return data;
    }

	public void setDlvOrderHelper(DlvOrderHelper dlvOrderHelper) {
		this.dlvOrderHelper = dlvOrderHelper;
	}

	public void setPickSlipHelper(PickSlipHelper pickSlipHelper) {
		this.pickSlipHelper = pickSlipHelper;
	}

	public void setSuppInvHelper(SuppInvHelper suppInvHelper) {
		this.suppInvHelper = suppInvHelper;
	}

	public void setWoInvHelper(WoInvHelper woInvHelper) {
		this.woInvHelper = woInvHelper;
	}

	public void setTransferHelper(TransferHelper transferHelper) {
		this.transferHelper = transferHelper;
	}

	public void setSuppInvBackHelper(SuppInvBackHelper suppInvBackHelper) {
		this.suppInvBackHelper = suppInvBackHelper;
	}

	public void setCheckTransferHelper(CheckTransferHelper checkTransferHelper) {
		this.checkTransferHelper = checkTransferHelper;
	}
    

}
